const path = require('path');

module.exports = {
  configureWebpack: {
    resolve: {
      alias: {
        'api': path.resolve(__dirname, './src/api'),
        'com': path.resolve(__dirname, './src/comments'),
        'view': path.resolve(__dirname, './src/views'),
        'uti': path.resolve(__dirname, './src/utils'),
      }
    }
  },
  devServer: {
    proxy: {
      '/tian': {
        target: 'http://tian.tianguixing.com:4001/api/private/v1',
        pathRewrite: {
          '/tian': ''
        }
      },
      '/9yue': {
        target: 'http://9yuecloud.com:9988/api/private/v1',
        pathRewrite: {
          '/9yue': ''
        }
      },
      '/shi': {
        target: 'http://shiyansong.cn:8888/api/private/v1',
        pathRewrite: {
          '/shi': ''
        }
      },
      '/time': {
        target: 'http://timemeetyou.com:8889/api/private/v1',
        pathRewrite: {
          '/time': ''
        }
      },
    }
  }
}
